#ifndef EYERWANDARTIST_EWAUITIMELINEWIDGET_HPP
#define EYERWANDARTIST_EWAUITIMELINEWIDGET_HPP

#include "EWAUITrackHeader.hpp"
#include "EWAUITimelineContext.hpp"
#include "EWAUIRuleWidget.hpp"
#include "EWAUITrackScrollContentLayout.hpp"

#include "EWAUIWidget/EWAUIWidgetHeader.hpp"
#include "EWAUIWidget/EWAUIWidgetHorizontalSegBar.hpp"

#include "EWAUITrackBody.hpp"
#include "EWAPrjFragmentUI.hpp"
#include "EWAPrjFragmentFragmentResourse.hpp"

namespace Eyer
{
    class EWAUITimelineWidget : public EWAUIWidget
    {
    public:
        EWAUITimelineWidget(EWAUILayoutParams width, EWAUILayoutParams height);
        ~EWAUITimelineWidget();

        int AddTrack();
        int InsertFragment(const EyerSmartPtr<EWAPrjFragmentFragmentResourse> & fragment, int trackId);

    private:
        EyerSmartPtr<EWAUITimelineContext> timelineCtx;

        EyerSmartPtr<EWAUILayout> ruleLayout;
            EyerSmartPtr<EWAUILayout> ruleHeaderLayout;
            EyerSmartPtr<EWAUIRuleWidget> ruleWidget;
        EyerSmartPtr<EWAUIWidgetScroll> verticalScroll;
            EyerSmartPtr<EWAUITrackScrollContentLayout> trackScrollContentLayout;
            EyerSmartPtr<EWAUIWidgetScroll> trackBodyScroll;
    };
}

#endif //EYERWANDARTIST_EWAUITIMELINEWIDGET_HPP
